<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {

    Route::get('/','Home\HomeController@index');                //   首页
    Route::get('/buy','Buy\BuyController@index');                   //   购买

    Route::get('/help','Help\IndexController@index');               //  帮助

    Route::get('/newbei','Help\IndexController@newbei');         //  新手教程
    Route::get('/introduction','Help\IndexController@functionIntroduction');         //  功能介绍
    Route::get('/problem','Help\IndexController@commonProblem');         //  常见问题
    Route::get('/trends','Help\IndexController@trends');                //  行业动态
    Route::get('/area','Help\IndexController@area');                    //  区域分布
    Route::get('/info','Help\IndexController@info');                    //  公司简介

    Route::get('/detail','Help\IndexController@detail');                    //  详情


    Route::get('/download','Download\IndexController@index');               //  下载

    Route::get('/login','User\LoginController@login');                         // 登录
    Route::post('/dologin','User\LoginController@doLogin');                         // 登录

    Route::get('/logout','User\LogoutController@logout');                       //  注销
    Route::get('/register','User\RegisterController@register');                  // 注册

    Route::post('/doregister','User\RegisterController@doRegister');                  // 注册

    Route::get('/send/code','User\IndexController@sendCode');                  // 发送验证码

    Route::get('/validateCode','ValidateCode\ValidateCodeController@doimg'); 			        // 验证码

    Route::get('/kefuqq','User\IndexController@KeFuqq');                                // 客服QQ
    Route::get('/getTeamqq','User\IndexController@getTeamqq');                          // 客服QQ

    Route::get('/getcode','ValidateCode\ValidateCodeController@doimg'); 			        // 验证码

    Route::get('/code','Code\CodeController@getCode'); 			        // 短信验证码

    Route::get('/getip','Code\CodeController@getIp'); 			        // 获取用户IP



   Route::group(['middleware'=>['Login']],function(){

       Route::get('/user','User\IndexController@index');                                //   个人中心
       Route::get('/user/invite','User\IndexController@invite');                       //   要请
       Route::get('/setting','User\IndexController@set');                              //  设置


       Route::get('/update/password','User\UpdateController@updatePassword');                              //  修改密码
       Route::get('/bind/email','User\UpdateController@updateEmail');                                 //  修改邮箱
       Route::get('/bind/phone','User\UpdateController@updatePhone');                                     //  绑定手机号
       Route::get('/bind/qq','User\UpdateController@updateQQ');                                         //  绑定qq

       Route::get('/pay','Pay\PayController@index');                                  //   购买
       Route::get('/createOrder','Pay\PayController@createOrder');                                  //  生成订单
       Route::get('/aliPay','Pay\PayController@aliPay');                                  //  调起支付宝


   });






});
